//
//  FKOrderDetailHeader.m
//  HappyTest
//
//  Created by Macbook Pro on 2019/1/25.
//  Copyright © 2019 Macbook Pro. All rights reserved.
//

#import "FKOrderDetailHeader.h"
#import "FKCustomBtn.h"
#import "FKDatePicker.h"

@interface FKOrderDetailHeader ()

@property (nonatomic, weak) UIButton *checkTimeBtn;
@property (nonatomic, strong) FKDatePicker *picker;

@end

@implementation FKOrderDetailHeader

- (FKDatePicker *)picker
{
    if (!_picker) {
        _picker = [[FKDatePicker alloc] init];
    }
    return _picker;
}

- (void)setupSubviews
{
    [super setupSubviews];
    self.contentView.backgroundColor = [UIColor whiteColor];
    self.contentView.clipsToBounds = true;
    
//    UIView *separator = [UIView fk_lineWithFrame:CGRectMake(0, 0, fkScreenW, fk_adjustW(10))];
//    [self.contentView addSubview:separator];
    
    
    UILabel *titleLabel = [UILabel fk_labelWithFont:fk_adjustFont(14) textColor:fkColor333333 text:@"商品清单"];
    [self.contentView addSubview:titleLabel];
    
    UIView *separator = [[UIView alloc] init];
    [self.contentView addSubview:separator];
    separator.backgroundColor = [UIColor groupTableViewBackgroundColor];
    
//    FKCustomBtn *checkTimeBtn = [FKCustomBtn fk_btnWithTarget:self action:@selector(checkTimeBtnClicked) font:fk_adjustFont(14) normalTitle:@"请选择核销时间" normalTitleColor:fkColor999999 selectedTitle:nil selectedTitleColor:nil normalImg:[UIImage imageNamed:@"arrow_down"] selectedImg:nil bgImg:nil selectedBgImg:nil];
//    [self.contentView addSubview:checkTimeBtn];
//    self.checkTimeBtn = checkTimeBtn;
//    checkTimeBtn.imagePosition = FKImagePositionRight;
//    [checkTimeBtn fk_viewCornerRadius:fk_adjustW(5) borderWidth:0.8 borderColor:fkColor666666];
//
//    UILabel *checkTimeLabel = [UILabel fk_labelWithFont:fk_adjustFont(14) textColor:fkColor333333 text:@"预约核销时间:"];
//    [self.contentView addSubview:checkTimeLabel];

    
    [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.offset(12);
        make.centerY.offset(0);
    }];
    [separator mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.offset(0);
        make.bottom.offset(0);
        make.height.offset(0.8);
    }];
//    [checkTimeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.width.offset(fk_adjustW(134));
//        make.height.offset(fk_adjustW(28));
//        make.right.offset(-12);
//        make.centerY.offset(0);
//    }];
//    [checkTimeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.right.equalTo(checkTimeBtn.mas_left).offset(-6);
//        make.centerY.offset(0);
//    }];
}

- (void)checkTimeBtnClicked
{
//    [self.picker show];
}

@end
